@extends('admin.layouts.app')
@section('css')
	<link href="{{asset('assets/plugins/select2/css/select2.min.css')}}" rel="stylesheet" type="text/css" />
 
@endsection
@section('content')


						
						

						
						<div class="row">
	<div class="col-sm-12">
								<div class="card-box">
                            				
        <form class="form-inline">
			<div class="form-group m-r-10">
			<label for="exampleInputName2">Keywords</label>
				<input type="text" class="form-control" name="keyword" placeholder="Registration Number" value="{{array_get($where,'keyword')}}">
			</div>
			
			
												<button type="submit" class="btn btn-default waves-effect waves-light btn-md">
													Search
												</button>

												<a href="{{url('zadmin/cars/create')}}" class="btn btn-info waves-effect waves-light btn-md">
													Add
												</a>
											</form>
							</div>				
                         </div>

							<div class="col-sm-12">
								<div class="card-box">


									
		<div class="table-rep-plugin">
			<div class="table-responsive" >
				<table  class="table  table-striped">
					<thead>
						<tr>
							<th>ID</th>
							
							<th>Registration Number</th>
							<th>Model</th>
							<th>Class</th>
							<th>Status</th>
							<th>LngLat</th>
														
							<th>Handler</th>
						</tr>
					</thead>
					<tbody>
                        @foreach($list as $v)  
						<tr>
							<td>{{$v->id}}</td>
							
							<td>{{$v->code}}</td>
							
							<td>
								{{$v->model}}
							</td>
							
							<td>	
								{{object_get($v,'type.name')}}
							</td>
							<td>	
								{{$v->status}}
								
							</td>
							<td>{{$v->lnglat}}</td>
							<td>
								<a href="{{url('zadmin/cars/'.$v->id.'/edit')}}" class="btn btn-default btn-sm">Edit</a>
								<a class="btn btn-sm btn-danger" href="{{url('zadmin/cars',$v->id)}}" data-method="delete" 
  data-token="{{csrf_token()}}" data-confirm="Are you sure you want to delete?">
<span class="btn-label">
  <i class="md md-close"></i>
</span>Delete</a>
							</td>
						</tr>
                        @endforeach
													
												</tbody>
											</table>
										</div>
{{$list->links()}}
									</div>

								</div>
							</div>
						</div>


 @endsection 
               
         

    @section('js')
        <script src="{{asset('assets/plugins/select2/js/select2.min.js')}}" type="text/javascript"></script>

      
    @endsection    

